package com.jenkins.test.web;

import com.jenkins.test.function.CalcAwardHandler;
import com.jenkins.test.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: {@link FunctionController}
 * @Description: TestController
 * @author: Lanzhou
 * @date: 2020/11/15 13:49
 * @QQ: 1627518680
 * @Copyright:2020 All rights reserved.
 */
@RestController
@RequestMapping("/function/")
public class FunctionController {

    @Autowired
    private CalcAwardHandler calcAwardHandler;

    /**
     * 获取数据
     *
     * @param type  类型
     * @param param 参数
     * @return
     */
    @GetMapping("award")
    public Result<Object> getPageData(String type, String param) {
        return Result.success(calcAwardHandler.getResult(type, param));
    }


}
